package com.avocado.bt.impl.action;

import com.avocado.bt.BTState;
import com.avocado.bt.IBTContext;
import com.avocado.bt.abs.action.ActionNode;
import com.avocado.mock.Player;

/**
 * @Author: zsh
 * @Date: 2023/10/17 16:22
 */
public class RecoverActionNode extends ActionNode {
    public RecoverActionNode(String param) {
        super(param);
    }

    @Override
    public BTState doUpdate(IBTContext context) {
        Player player = context.getPlayer();
        player.setHp(player.getHp() +20);
        System.out.println("恢复血量20点");
        return BTState.Completed;
    }
}
